//
//  HelpTool.h
//  BeautyVideos
//
//  Created by shuihulu02 on 15/12/2.
//  Copyright © 2015年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef enum {
    kDayIntervelTypeNone,   // 没有记录
    kDayIntervelTypeToday,   // 只有今天记录
    kDayIntervelTypeWeek,   // 只有除去今天外的记录
    kDayIntervelTypeTodayAndWeek,   // 今天和过去记录都有
}DayIntervelType;  // 时间类型==用于播放记录

typedef enum {
    kTipViewTypeNone, // 只有文本
    kTipViewTypeCheckmark, // 有一个勾
}kTipViewType;

typedef enum {
    ShareTypeQQPenple,
    ShareTypeQQAllSpace,
    ShareTypeWeixiPeople,
    ShareTypeWeixiAllLine,
}ShareType1;


// 删除本地文件回调block
typedef void(^DeleteLocalFileSuccessBlock)(void);
typedef void(^DeleteLocalFileFailureBlock)(NSError *error);

@interface HelpTool : NSObject
#pragma mark - 获取本地文件的大小
+ (unsigned long long)fileSizeForPath:(NSString *)path;

#pragma mark - 截取url字符串一部分，并使用utf8解码
+ (NSString *)getTextFromUrlString:(NSString *)urlString;

#pragma mark - 得到具体分享目标
+ (NSString *)shareGoalWithShareType:(ShareType1)type;

#pragma mark - 计算两个时间的天数差
+ (NSInteger)dateIntervelFrome:(NSDate *)from to:(NSDate *)to;

#pragma mark - 计算两个时间的分钟差
+ (NSInteger)minuteIntervelFrom:(NSDate *)from to:(NSDate *)to;

#pragma mark - 获取时间戳有多少秒
+ (NSInteger)secondTimeWithData:(NSDate *)date;

#pragma mark - 删除一个本地文件
+ (void)deleteLocalFileWithFilePath:(NSString *)filePath success:(DeleteLocalFileSuccessBlock)success failure:(DeleteLocalFileFailureBlock)failure;

#pragma mark - 百度统计
#pragma mark 页面统计
+ (void)statPageStartWithPagename:(NSString *)pagename;
+ (void)statPageEndWithPagename:(NSString *)pagename;
//记录一次事件的点击
+ (void)statEventId:(NSString*)eventId eventLabel:(NSString*)eventLabel;
//记录一次事件的开始
+ (void)statStartEventId:(NSString*)eventId eventLabel:(NSString*)eventLabel;
//记录一次事件的结束
+ (void)statEndEventId:(NSString *)eventId eventLabel:(NSString *)eventLabel;
#pragma mark - 添加一个自动移除的提示
+ (void)startTipViewWithText:(NSString *)text duration:(CGFloat)duration type:(kTipViewType)type;

#pragma mark - 设置文件不备份处理
+ (NSInteger)addSkipBackupAttributeToItemAtURL:(NSString *)path;

#pragma mark - 获取view所在的控制器
+ (UIViewController *)viewControllerOfView:(UIView *)view;

#pragma mark - 对字符串进行url编码
+(NSString*)encodeString:(NSString*)unencodedString;

//获取唯一标示
+ (NSString *)getIOSuuid;
+ (NSDictionary *)initWithGroupId:(NSString *)groupId senderId:(NSString *)senderId senderName:(NSString *)senderName senderFaceUrl:(NSString *)senderFaceUrl gradeIconUrl:(NSString *)gradeIconUrl messageText:(NSString *)messageText giftImageUrl:(NSString *)giftImageUrl WithGiftCount:(NSInteger)giftCount withGiftName:(NSString *)giftStr withAction:(int)action withGIFImage:(NSString *)GIFImageStr withFlowerGiftID:(NSString *)giftID;



@end
